package com.eorchis.module.classuser.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.eorchis.utils.DateUtil;
import com.eorchis.utils.utils.PropertyUtil;

public class RecordInfoBean {
	private String trainProgramName;
    private BigDecimal hoursBig;
    private String trainDeptName;
    private Integer assess;
    private String assessStr;
    private String classUserId;
    private String classId;
    private String year;
    private Date beginDate;
    private Date endDate;
    private String userStudyHourId;
    private Double hours;
    
    private String startAndEndDates;
    private Integer ROWNUM_;
	public void setROWNUM_(Integer rOWNUM_) {
		ROWNUM_ = rOWNUM_;
	}
	public String getTrainProgramName() {
		return trainProgramName;
	}
	public void setTrainProgramName(String trainProgramName) {
		this.trainProgramName = trainProgramName;
	}
	
	public Double getHours() {
		return hours;
	}
	public void setHours(Double hours) {
		this.hours = hours;
	}
	public String getTrainDeptName() {
		return trainDeptName;
	}
	public void setTrainDeptName(String trainDeptName) {
		this.trainDeptName = trainDeptName;
	}
	public Integer getAssess() {
		return assess;
	}
	public void setAssess(Integer assess) {
		this.assess = assess;
	}
	public String getAssessStr() {
		if(PropertyUtil.objectNotEmpty(assess)){
			if(assess==1){
				return "合格";
			}
			if(assess==2){
				return "不合格";
			}
		}
		return "";
	}
	public void setAssessStr(String assessStr) {
		this.assessStr = assessStr;
	}
	public String getClassUserId() {
		return classUserId;
	}
	public void setClassUserId(String classUserId) {
		this.classUserId = classUserId;
	}
	public String getClassId() {
		return classId;
	}
	public void setClassId(String classId) {
		this.classId = classId;
	}
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
    
	public String getStartAndEndDates() {
		if(getBeginDate()!=null&&getEndDate()!=null) {
			return DateUtil.getDateString(getBeginDate(), "yyyy.MM.dd")+"-"+DateUtil.getDateString(getEndDate(), "yyyy.MM.dd");
		}
		return startAndEndDates;
		
	}
	public void setStartAndEndDates(String startAndEndDates) {
		this.startAndEndDates = startAndEndDates;
	}
	public String getUserStudyHourId() {
		return userStudyHourId;
	}
	public void setUserStudyHourId(String userStudyHourId) {
		this.userStudyHourId = userStudyHourId;
	}
	public BigDecimal getHoursBig() {
		return hoursBig;
	}
	public void setHoursBig(BigDecimal hoursBig) {
		if(hoursBig!=null) {
			setHours(Double.parseDouble(hoursBig.toString()));
		}
		this.hoursBig = hoursBig;
	}
	
}
